clear all
clc
addpath utils
addpath utils/Violinplot-Matlab-master

data = readtable('blur_metric.xlsx');
data = table2array(squeeze(data(1:100,2:6)));

%ANOVA analysis
[p,tbl,stats] = anova1(data);
results = multcompare(stats);
tbl = array2table(results)

%followed by bonferroni correction
[results,means,~,gnames] = multcompare(stats,"CriticalValueType","bonferroni");
tbl = array2table(results)


xlabels = {'1.8-fold GRAPPA', '3.3-fold Low-res', '3.3-fold REGAIN', '5.7-fold Low-res', '5.7-fold REGAIN'};
figure, violins = violinplot(data,3,'QuartileStyle','shadow','DataStyle','none','ShowMean',true), grid on;...
    ylabel('Blur Metric (0:Sharperst, 1:Blurries)'),xticklabels(xlabels);

